#include "headfile/mainwindow.h"
#include "headfile/login.h"
#include "headfile/connection.h"
#include "headfile/myhelper.h"
#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    // 数据库连接
    if(!createConnection())
        return 0;

    MainWindow w;
    login lin;

    if(lin.exec() == QDialog::Accepted){
        w.show();
        return a.exec();
    }
    else {
        return 0;
    }
}
